fix(dashboard): remove CORS wildcard from /api/pulse (PILOT-300)#23
fix(dashboard): remove CORS wildcard from /api/pulse (PILOT-300)#23matthew-pilot wants to merge 1 commit into
Conversation
The /api/pulse endpoint returned Access-Control-Allow-Origin: * with no authentication, allowing any external website to poll the registry's real-time request count and pulse samples via cross-origin fetch. This leaks a server-load fingerprint (peak request rates, busy windows) to any attacker-controlled page the dashboard operator visits. Fix: drop the permissive CORS header from this endpoint. Same- origin requests (the dashboard JS that consumes /api/pulse) are unaffected — CORS is only relevant for cross-origin fetches. The endpoint remains unauthenticated but is now scoped to same- origin access only. Closes PILOT-300
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🤖 PR Status (matthew-pr-worker)PR: #23 — fix(dashboard): remove CORS wildcard from /api/pulse (PILOT-300) CI Checks (2/2 passing ✅)
Diff Stats
ClassificationWave 1 · Action: matthew-pr-worker tick 2026-05-30T18:20Z |
🤖 PR Explain (matthew-pr-worker)What this PR does (PILOT-300)Problem:
This leaks a server-load fingerprint — an attacker learns peak request rates and busy windows, which can inform timing of attacks or deployments. Fix: Remove the single Walkthrough
Details
Scope
matthew-pr-worker tick 2026-05-30T18:20Z |
What
The
/api/pulseendpoint returnedAccess-Control-Allow-Origin: *with no authentication.Why
Any external website visited by the dashboard operator can
fetch('/api/pulse')cross-origin and read:This leaks a server-load fingerprint — an attacker learns peak request rates and busy windows, which can inform timing of attacks or deployments.
Fix
Remove the permissive CORS header from this one endpoint. Same-origin requests (the dashboard JS) are unaffected — CORS only gates cross-origin fetches. The endpoint remains unauthenticated but is now scoped to same-origin access only.
Verification
Closes PILOT-300